package com.ly.heart.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ly.common.core.domain.BaseVo;

import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 购买标书记录
 * </p>
 * @author WuZH
 * @since 2024-05-14
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName ("erp_buy_bid_info")
@ApiModel (value = "购买标书记录", description = "购买标书记录")
public class BuyBidEntity extends BaseVo {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty ("id")
    @TableId (value = "id", type = IdType.INPUT)
    private String id;

    @ApiModelProperty ("已审批通过的标书记录")
    @TableField ("bid_id")
    private String bidId;

    @ApiModelProperty ("客户Id")
    @TableField ("customer_id")
    private String customerId;

    @ApiModelProperty ("投标基础信息Id")
    @TableField ("tender_id")
    private String tenderId;

    @ApiModelProperty ("具体购买时间")
    @TableField ("buy_time")
    @JsonFormat( pattern = "yyyy-MM-dd" )
    private Date buyTime;

    @ApiModelProperty ("添加用户Id")
    @TableField ("user_id")
    private String userId;

    @ApiModelProperty ("新增时间")
    @TableField ("create_time")
    @JsonFormat( pattern = "yyyy-MM-dd HH:mm:ss" )
    private Date createTime;

    @ApiModelProperty ("更新时间")
    @TableField ("change_time")
    @JsonFormat( pattern = "yyyy-MM-dd HH:mm:ss" )
    private Date changeTime;

    @TableField ("is_used")
    private Integer isUsed;

    @ApiModelProperty ("流程实例id")
    @TableField ("instance_id")
    private String instanceId;

    @ApiModelProperty ("流程状态")
    @TableField ("state")
    private String state;



    @TableField(exist = false)
    @ApiModelProperty("标书管理信息")
    private BidEntity bid;

    @TableField(exist = false)
    @ApiModelProperty("投标决策信息")
    private TenderEntity tender;

    @TableField(exist = false)
    @ApiModelProperty("客户信息")
    private CustomerEntity customer;

    @ApiModelProperty("业务type")
    @TableField (exist = false)
    private String businessType;

    @ApiModelProperty("流程模型id")
    @TableField (exist = false)
    private String modelId;

}
